<?php
/**
 +-----------------------------------------------------------------------+
 | dcAlbums - a Flickr plugin for Dotclear 2                             |
 | Copyright (C) 2008 - France                                           |
 |                                                                       |
 | This program is free software: you can redistribute it and/or modify  |
 | it under the terms of the GNU General Public License as published by  |
 | the Free Software Foundation, version 2 of the License.               |
 |                                                                       |
 | This program is distributed in the hope that it will be useful,       |
 | but WITHOUT ANY WARRANTY; without even the implied warranty of        |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
 | GNU General Public License for more details.                          |
 |                                                                       |
 | You should have received a copy of the GNU General Public License     |
 | along with this program.  If not, see <http://www.gnu.org/licenses/>. |
 |                                                                       |
 +-----------------------------------------------------------------------+
 |  Author : Erwan Richard <contact@erwan-richard.info>                  |
 +-----------------------------------------------------------------------+ 
*/
global $__autoload, $core;

require (dirname(__FILE__).'/class.dc.flickr.php');
$GLOBALS['__autoload']['dcAlbums'] = dirname(__FILE__).'/class.dc.flickr.php';

if (!is_null($core->blog->settings->dcAlbums_album_url_prefix)) {
	
	$core->url->register('albums',$core->blog->settings->dcAlbums_albums_url_prefix, '^'.
		$core->blog->settings->dcAlbums_albums_url_prefix.'(.*)$',array('urlFlickr','albums'));
	$core->url->register('album',$core->blog->settings->dcAlbums_album_url_prefix, '^'.
		$core->blog->settings->dcAlbums_album_url_prefix.'/(.+)$',array('urlFlickr','album'));
		
}
?>
